using System.Data;
using Framework.Library.Components.Providers;
using Framework.Module.FAQ.Library.Questions;

namespace Framework.Module.FAQ.Library.Providers
{
	public abstract class DataAccessProvider
	{
		private static DataAccessProvider objProvider;
		public static DataAccessProvider instance()
		{
			if (objProvider == null)
			{ 
				DataAccessProviderConfiguration objConfig = DataAccessProviderConfiguration.GetDataAccessProviderConfiguration();
				Provider defaultProvider = (Provider)objConfig.Providers[objConfig.DefaultProvider];
                Provider provider = new Provider(defaultProvider.ProviderName, "Framework.Module.FAQ.Library.Providers." + defaultProvider.ProviderName, defaultProvider.ConnectionString);
				objProvider = (DataAccessProvider) DataAccessProviderFactory.CreateDataAccess(provider);
			}
			return objProvider;
		}
		public abstract DataTable GetQuestions();
        public abstract DataTable GetQuestionsByFAQ_Show();
        public abstract DataTable getQuestionByFAQShow(int zoneID, string lang);
		public abstract DataTable GetAllQuestions();
        public abstract DataTable getAll();
        public abstract DataTable getQuestionWithZone(int zoneid);
        public abstract DataTable get_AllQuestion(int zoneid, string lang);

        public abstract DataTable getZone(int faq_parentid,string lang);
		
		public abstract void SetQuestionIndex(int id, int index);
		
		public abstract void SetQuestionStatus(int id, bool status);
        public abstract void  SetQuestionShow(int id,bool  show);

		public abstract void DeleteQuestion(int _fAQ_ID);

		public abstract int CreateQuestion(QuestionInfo _questionInfo);
        
		public abstract void UpdateQuestion(QuestionInfo _questionInfo);
        public abstract void UpdateQuestion_Show(QuestionInfo _questionInfo);

		public abstract QuestionInfo GetQuestion(int _fAQ_ID);


        internal object GetAll()
        {
            throw new System.Exception("The method or operation is not implemented.");
        }
    }
}
